]> dgit.raspbian.org Git - gnome-shell.git/commit
environment: Add async ease variants
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Dec 2019 22:07:55 +0000 (23:07 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 18 Dec 2025 16:05:56 +0000 (16:05 +0000)
commita352e519dbffa2b90b1a6ddd9080b2eb891e224d
tree910571f7060decb108b56085f7b9823eff795fc3
parent8efd2ec8b9c62cac7e875bc8d7b596b2b1f90f7c
environment: Add async ease variants

Ease functions can be used nested, and often need to complete before
performing an action.

This is currently handled by providing onComplete/onStopped callbacks,
which can get tedious when nesting.

To make these cases more convenient, add async variants that return
a promise that is resolved when the transition completes, so that
callers can await the result instead.

In case the transition was interrupted, the promise is rejected with a
CANCELLED error, so that it stops a promises chain and can easily be
filtered out in catch handlers.

Base on an original patch by Marco Trevisan.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3948>
js/ui/environment.js